package com.aidex.web.controller.api;

import com.aidex.biz.domain.vo.CustomerVo;
import com.aidex.biz.service.CustomerService;
import com.aidex.common.annotation.Log;
import com.aidex.common.core.controller.BaseController;
import com.aidex.common.enums.BusinessType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * 客户信息推送
 *
 * @author sean
 * @email 2074844820@qq.com
 * @date 2022-04-22
 */
@RestController("ApiPushCustomerController")
@RequestMapping("/webApi/pushCustomer")
public class PushCustomerController extends BaseController {

    @Autowired
    private CustomerService customerService;

    @Log(title = "左心房客户推送信息", businessType = BusinessType.INSERT)
    @RequestMapping(value = "insert", method = RequestMethod.POST)
    @ResponseBody
    public Map insert(@RequestBody CustomerVo customer) {
        return customerService.savePushCustomer(customer);
    }
}
